package com.tjx.service.impl;

import com.tjx.entity.AmusementProject;
import com.tjx.mapper.AmusementProjectMapper;
import com.tjx.service.IAmusementProjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 游乐项目表 服务实现类
 * </p>
 *
 * @author tjx
 * @since 2025-10-29
 */
@Service
public class AmusementProjectServiceImpl extends ServiceImpl<AmusementProjectMapper, AmusementProject> implements IAmusementProjectService {
    @Autowired
    private AmusementProjectMapper amusementProjectMapper;

    /**
     * 查询所有游乐项目
     */
    @Override
    public List<AmusementProject> amusementProjectQueryAll() {
        return amusementProjectMapper.selectList(null);
    }

    /**
     * 修改游乐项目
     */
    @Override
    public Integer amusementProjectUpdate(AmusementProject amusementProject) {
        amusementProject.setUpdateDate(LocalDate.now());
        return amusementProjectMapper.updateById(amusementProject);
    }
}
